<?php
function jeenShow($jobj) { //打印对象调试信息
    $jtype = gettype($jobj);
    echo  '<br><div style="background:#eee;padding:10px;">'.$jtype.': -- Information -------------<br>';
    if($jtype == 'array') {
        foreach($jobj as $jkey=>$jvalue) { 
            echo  '<br>'.$jkey .' = ';
            print_r($jvalue);
        }
    }
    else if($jtype == 'object') {
        $jclass = get_class($jobj);
        $jref = new ReflectionClass($jclass);   
        $jvars = $jref->getProperties(); 
        $jmethods = $jref->getMethods();
        echo 'Class : '.$jclass.' | has: '.
            count($jvars) .' vars  and  '.
            count($jmethods). ' methods .<br>You can see it in File:'
                .$jref->getFileName().'<br>';
        $property_str = '<br><b>Properties:</b><hr>';
        foreach($jvars as $property)
        { 
            $modname = Reflection::getModifierNames($property->getModifiers());
            $modname = $modname[0];
            $property_str .= $modname.' <b>'.$property->getName().'</b> <- '
                    .$property->getDeclaringClass()->getName().'  <br>'; 
        } 
        echo $property_str;
        
        echo '<br><b>Functions</b>:<hr>';
        foreach($jmethods as $key=>$value) {
            $params = '';
            $modname = Reflection::getModifierNames($value->getModifiers());
            $modname = $modname[0];
            echo $key.'|<b>'.$modname.'</b> '
                    .$value->getDeclaringClass()->getName()
                    .'-><b>'.$value->getName() .'</b>(';
            foreach($value->getParameters() as $jparam) { 
                $params .= $jparam;
            }
            for($i = 1;$i<10;$i++)
                $params = str_replace(']Parameter #'.$i.' [',',',$params) ;
            $params = str_replace('Parameter #0 [','',$params) ;
            $params = str_replace(']','',$params) ;
            echo $params;
            echo ')<br>';  
        }
        if($jref->hasMethod('getData')) {
            //echo $jref->getName().'->getData() :<hr>'; 
            //print_r($jobj->getData()); echo '<br>';
        }
        if($jref->hasMethod('debug')) {
            //echo $jref->getName().'->debug() :<hr>';
            //print_r($jobj->debug());echo '<br>';
        }
    }
    else {
        print_r($jobj);
    }
    echo  '<br><br>'.$jtype.': -- Information End ----------<br></div><br>';
    return 1;
}//jeenShow end;

define('BP',realpath(dirname(__FILE__)));//Real Path

//jeenShow($_SERVER);
if($_SERVER['HTTP_HOST'] == 'wj.jlzx.com')
    define('WP','/tp_locale/');//Web Path 
else 
    define('WP','/jlzx/tp_locale/');//Web Path 

//定义项目名称和路径
define('APP_NAME', 'lang');
define('APP_PATH', './');

define('APP_DEBUG',true); //调试模式, 生产环境请设置为false
// 加载框架入口文件
require( "../../thinkphp/lib/ThinkPHP/ThinkPHP.php");